<template>
  <div>
    <el-table :data="tableData"
              border
              stripe
              style="width: 100%">
      <el-table-column type="expand">
        <template slot-scope="props">
          <el-form label-position="left"
                   inline
                   class="demo-table-expand">
            <el-form-item label="所在组">
              <span>{{ props.row.territory }}</span>
            </el-form-item>
            <el-form-item label="区域">
              <span>{{ props.row.county }}</span>
            </el-form-item>
            <el-form-item label="执行人">
              <span>{{ props.row.trackPepole }}</span>
            </el-form-item>
            <el-form-item label="拜访对象">
              <span>{{ props.row.target }}</span>
            </el-form-item>
            <el-form-item label="时间">
              <span>{{ props.row.tm }}</span>
            </el-form-item>
            <el-form-item label="沟通结果">
              <span>{{ props.row.content }}</span>
            </el-form-item>
            <el-form-item label="输出商机">
              <span>{{ props.row.commercialOpportunity }}</span>
            </el-form-item>
            <el-form-item label="添加微信">
              <span>{{ props.row.isWeChat }}</span>
            </el-form-item>
            <el-form-item label="下次拜访">
              <span>{{ props.row.tmNext }}</span>
            </el-form-item>
          </el-form>
        </template>
      </el-table-column>
      <el-table-column prop="territory"
                       label="所在组"
                       width="120"
                       align="center">
      </el-table-column>
      <el-table-column prop="county"
                       label="区域"
                       width="120"
                       align="center">
      </el-table-column>
      <el-table-column prop="trackPepole"
                       align="center"
                       width="120"
                       label="执行人">
      </el-table-column>
      <el-table-column prop="target"
                       align="center"
                       width="120"
                       label="拜访对象">
      </el-table-column>
      <el-table-column prop="tm"
                       align="center"
                       width="160"
                       label="时间">
      </el-table-column>
      <el-table-column prop="content"
                       align="center"
                       label="沟通结果">
        <template slot-scope="props">
          <el-popover placement="bottom"
                      trigger="hover"
                      :content="props.row.content">
            <span slot="reference"
                  class="table-overflow-hidden">{{props.row.content}}</span>
          </el-popover>
        </template>
      </el-table-column>
      <el-table-column prop="commercialOpportunity"
                       align="center"
                       label="输出商机">
        <template slot-scope="props">
          <el-popover placement="bottom"
                      trigger="hover"
                      :content="props.row.commercialOpportunity">
            <span slot="reference"
                  class="table-overflow-hidden">{{props.row.commercialOpportunity}}</span>
          </el-popover>
        </template>
      </el-table-column>
      <el-table-column prop="isWeChat"
                       align="center"
                       width="100"
                       label="添加微信">
      </el-table-column>
      <el-table-column prop="tmNext"
                       align="center"
                       width="120"
                       label="下次拜访">
      </el-table-column>
      <el-table-column label="操作"
                       align="center"
                       width="100">
        <template slot-scope="scope">
          <el-button type="text"
                     size="small">
            删除
          </el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
  name: 'TrackInfo',
  data() {
    return {
      tableData: []
    }
  }
}
</script>
<style lang="scss" scoped>
.demo-table-expand {
  font-size: 0;
}
.demo-table-expand label {
  width: 90px;
  color: #99a9bf;
}
.demo-table-expand .el-form-item {
  margin-right: 0;
  margin-bottom: 0;
  width: 50%;
}
</style>
